-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some missing syn invisible group handling in FromMeta implementations #263
Fix some missing syn invisible group handling in FromMeta implementations #263
Conversation
This was supposed to be fixed by c036162 but it looks like this implementation was forgotten.
It's currently named "Unexpected litteral type", but it can also be instantiated when not parsing a litteral, e.g. https://github.com/TedDriggs/darling/blob/224a866727cd9e40c2cd80430852b1ea0deeb40e/core/src/error/mod.rs#L152 This specifically made investigation of TedDriggs#263 more difficult.
2ccf283
to
aecdfec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some unit tests to src/from_meta
that show inputs which rely on this change? That will make it easier to understand the change, and to prevent any future regressions.
It's currently named "Unexpected litteral type", but it can also be instantiated when not parsing a litteral, e.g. https://github.com/TedDriggs/darling/blob/224a866727cd9e40c2cd80430852b1ea0deeb40e/core/src/error/mod.rs#L152 This specifically made investigation of #263 more difficult.
As of syn 2.40, syn may generate this invisible token when the input to the darling proc macro (specifically, the attributes) are generated by a |
Okay, can you add that as a comment in the source code with each of these changes so that it's clear later why this is going on? |
This was supposed to be fixed by c036162 but it looks like these implementations were forgotten.